package kr.hkit.powerjava.chapter10.submit;

import java.util.Scanner;

class Employee {

	private String name;
	private String address;
	private int salary;
	private int phonenum;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getSalary() {
		return salary;
	}

	public void setSalary(int salary) {
		this.salary = salary;
	}

	public int getPhonenum() {
		return phonenum;
	}

	public void setPhonenum(int phonenum) {
		this.phonenum = phonenum;
	}

	@Override
	public String toString() {
		return "Employee [name=" + name + ", address=" + address + ", salary="
				+ salary + ", phonenum=" + phonenum + "]";
	}
}

public class EmployeeTest {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		
		Employee [] employees = new Employee [3];
		
		for (int i=0 ; i<employees.length; i++) {

			employees [i] = new Employee ();

			System.out.print("직원의 이름을 입력하시오: ");
			employees[i].setName(scan.next());
			System.out.print("직원의 주소를 입력하시오: ");
			employees[i].setAddress(scan.next());
			System.out.print("직원의 연봉을 입력하시오: ");
			employees[i].setSalary(scan.nextInt());
			System.out.print("직원의 전화번호를 입력하시오: ");
			employees[i].setPhonenum(scan.nextInt());
		}
		
		
		for (int i = 0; i < employees.length; i++) {
			System.out.println(employees[i]);
		}
	}
}
	

